package org.apache.servicecomb.fence.resource;

import org.apache.ibatis.annotations.*;
import org.apache.servicecomb.fence.api.resource.VertxResponseInfo;

@Mapper
public interface VertxResponseMapper {
    @Select("""
            select id, RESPONSEINFO from vertx_response_info where id=#{id};
      """)
    VertxResponseInfo getById(@Param("id") Long msgId);


    @Select("""
            select max(id) from vertx_response_info
      """)
    int getMaxId();

    @Insert("""
      insert into
      vertx_response_info(id,RESPONSEINFO)
      values(#{id},#{RESPONSEINFO})
      """)
    int insert(@Param("id") int id,
                        @Param("RESPONSEINFO") String RESPONSEINFO);


}
